package com.tencent.sr.iris.basic.saas.service.activity;

import com.tencent.sr.iris.activity.interfaces.request.IrisPaginationRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.ActivityMonthLimitAddRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.ActivityUidLimitAddRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.ActivityUidLimitPageRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.ActivityUidLimitUpdateRequest;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityMonthLimitResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityUidLimitResponse;
import com.tencent.sr.iris.basic.saas.dependency.activity.ActivityConfigDependency;
import com.tencent.sr.rmall.common.request.PaginationRequest;
import com.tencent.sr.rmall.common.response.PaginationResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 活动配置
 *
 * @author nixiaolin
 */
@Service
@Slf4j
public class ActivityConfigService {

    @Resource
    private ActivityConfigDependency activityConfigDependency;

    public PaginationResponse<ActivityMonthLimitResponse> monthLimitConfigPage(PaginationRequest request) {
        return activityConfigDependency.monthLimitConfigPage(request);
    }

    public PaginationResponse<ActivityUidLimitResponse> uidLimitConfigPage(
            IrisPaginationRequest<ActivityUidLimitPageRequest> request) {
        return activityConfigDependency.uidLimitConfigPage(request);
    }

    public Boolean addCurrentMonthLimit(ActivityMonthLimitAddRequest request) {
        return activityConfigDependency.addCurrentMonthLimit(request);
    }

    public Boolean addUidLimit(ActivityUidLimitAddRequest request) {
        return activityConfigDependency.addUidLimit(request);
    }

    public Boolean updateUidLimit(ActivityUidLimitUpdateRequest request) {
        return activityConfigDependency.updateUidLimit(request);
    }
}
